#ifndef __PATTERN_H__
#define __PATTERN_H__

#include "common.h"
#include "pixel.h"

class Pattern{
	private:
		vector<Pixel> p;
		
	public:
		Pattern(void);
		~Pattern(void);
		
		inline Pixel& pixel(int index) {return this->p[index];}
		inline Pixel& lastPixel(void) {return this->p.back();}
		inline void addPixel(int x,int y){this->p.push_back(Pixel(x,y));}
		inline void removePixel(void){this->p.pop_back();}
		inline int size(void){return (int)this->p.size();}
		inline int getPixelX(int index){return (int)this->p[index].x();}
		inline int getPixelY(int index){return (int)this->p[index].y();}
		
		void print(void);
	
};

#endif
